home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / libblas / rotg.z / rotg
Encoding:
Text File  |  2002-10-03  |  2.7 KB  |  88 lines

  1. ROTG(3F)                                              Last changed: 11-2-98
  2.  
  3.  
  4. NNAAMMEE
  5.      SSRROOTTGG, DDRROOTTGG - Constructs a Givens plane rotation
  6.  
  7. SSYYNNOOPPSSIISS
  8.      Real
  9.  
  10.         CCAALLLL SSRROOTTGG ((_a,, _b,, _c,, _s))
  11.  
  12.      Double precision
  13.  
  14.         CCAALLLL DDRROOTTGG ((_a,, _b,, _c,, _s))
  15.  
  16. IIMMPPLLEEMMEENNTTAATTIIOONN
  17.      IRIX systems
  18.  
  19. DDEESSCCRRIIPPTTIIOONN
  20.      DDRROOTTGG/SSRROOTTGG computes the elements of a rotation matrix such that:
  21.  
  22.           _      _     _   _    _   _
  23.           | c  s |     | a |    | r |
  24.           |-s  c | *   | b | =  | 0 |
  25.           -      -     -   -    -   -
  26.  
  27.      where
  28.                         2    2       2    2
  29.           r = +- sqrt (a  + b ) and c  + s  = 1
  30.  
  31.      These routines have the following arguments:
  32.  
  33.      _a      First vector component.  (input and output)
  34.  
  35.             SSRROOTTGG (Real), DDRROOTTGG (Double precision):
  36.             On input, the first component of the vector to be rotated.  On
  37.             output, _a is overwritten by by _r, the first component of the
  38.             vector in the rotated coordinate system where:
  39.                            2    2
  40.             r = sign(sqrt(a  + b ),a), if |a| > |b|
  41.  
  42.  
  43.                            2    2
  44.             r = sign(sqrt(a  + b ),b), if |a| <= |b|
  45.  
  46.      _b     Second vector component. (input and output)
  47.            SSRROOTTGG: Real.
  48.            DDRROOTTGG: Double precision.
  49.            On input, the second component of the vector to be rotated.  On
  50.            output, _b contains _z, where:
  51.            _z=_s  if |_a| > |_b|
  52.            _z=1/_c     if |_a| <= |_b| and _c =/ 0
  53.            z=1  if c = 0.
  54.  
  55.      _c     Cosine of the angle of rotation. (output)
  56.            SSRROOTTGG: Real.
  57.            DDRROOTTGG: Double precision.
  58.  
  59.      _s     Sine of the angle of rotation. (output)
  60.            SSRROOTTGG: Real.
  61.            DDRROOTTGG: Double precision.
  62.  
  63.  
  64.  
  65. NNOOTTEESS
  66.      SSRROOTTGG/DDRROOTTGG routines are Level 1 Basic Linear Algebra Subprograms
  67.      (Level 1 BLAS).
  68.  
  69.      The value of _z, returned in _b by SSRROOTTGG, gives a compact representation
  70.      of the rotation matrix, which can be used later to reconstruct _c and _s
  71.      as in the following example:
  72.  
  73.           IF (B .EQ. 1. ) THEN
  74.              C = 0.
  75.              S = 1.
  76.           ELSEIF( ABS( B) .LT. 1) THEN
  77.              C = SQRT( 1. - B * B)
  78.              S = B
  79.           ELSE
  80.              C = 1. / B
  81.              S = SQRT( 1 - C * C)
  82.           ENDIF
  83.  
  84. SSEEEE AALLSSOO
  85.      RROOTT(3F), RROOTTMM(3F), RROOTTMMGG(3F)
  86.  
  87.      This man page is available only online.
  88.